<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>小灰的个人技术网站</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }
      body {
        width: 100vw;
        height: 100vh;
      }
      .back-container {
        height: 100vh;
        position: relative;
        background-color: #3498db;
        /* background-image: url("./image/woman-background.jpg"); */
        background-size: 100% 100%;
        height: 100%;
        position: fixed;
        width: 100%;
      }
      aside {
        width: 60%;
        background-color: rgba(0, 0, 0, 0.3);
        border-radius: 0.3rem;
        height: 6%;
        position: fixed;
        left: 50%;
        top: 30%;
        transform: translate(-50%, -40%);
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 13px;
        color: #fff;
      }
      #tipDialog{
        animation: tip 4s;
        opacity: 0;
      }
      
      .back-filter {
        width: 100vw;
        height: 100vh;
        position: absolute;
        background-color: rgba(0, 0, 0, 0);
        z-index: 1000;
      }
      .back-after-filter {
        transition: 1s;
        background-color: rgba(0, 0, 0, 0.3);
      }
      .back-filter > .box-container {
        width: 100%;
        height: 25%;
        transform: translateY(150%);
        display: flex;
        align-items: center;
        justify-content: space-evenly;
      }
      .cirle {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 17px;
        text-transform: uppercase;
        font-weight: 800;
      }
      .cirle:nth-child(1) {
        background-color: #f44444;
        opacity: 0;
      }
      .cirle.cirle:nth-child(2) {
        background-color: #409eff;
      }
      .cirle:nth-child(3) {
        background-color: #fff;
        opacity: 0;
      }
      .csdn-box {
        color: #fff;
        text-shadow: 2px 1px 8px #fff;
        box-shadow: 0px 0px 10px #f44444;
        transform: translateX(180%);
        cursor: pointer;
      }
      .open-btn {
        box-shadow: 0px 0px 10px #409eff;
        position: relative;
        z-index: 1000;
      }
      .open-btn > img {
        width: 50%;
        height: 50%;
      }
      .vue-box {
        color: #3eaf7c;
        text-shadow: 2px 1px 8px #3eaf7c;
        box-shadow: 0px 0px 10px #fff;
        transform: translateX(-180%);
        cursor: pointer;
      }
      .csdn-location {
        transition: 1s;
        transform: translateX(-5%);
      }
      .close-status {
        transition: 1s;
        opacity: 0;
      }
      .vue-location {
        transition: 1s;
        transform: translateX(1%);
      }
      .click-after {
        box-shadow: 0px 0px 50px #fff;
      }
      @keyframes tip {
        from{
          opacity: 1;
        }
        to{
          opacity: 0;
        }
      }
    </style>
  </head>
  <body>
    <!-- 背景容器 -->
    <main class="back-container"></main>
    <!-- 模糊图片 -->
    <div class="back-filter">
      <aside id="tipDialog">Welcome to xiaohui's website</aside>
      <div class="box-container">
        <div class="csdn-box cirle" id="csdnBtn">csdn</div>
        <div class="open-btn cirle" id="open">
          <img src="./image/工具箱 .png" alt="" />
        </div>
        <div class="vue-box cirle" id="vueBtn">vue</div>
      </div>
    </div>
  </body>
  <script>
    // 监听点击按钮打开事件
    let openBtn = document.getElementById("open");
    let csdnBtn = document.getElementById("csdnBtn");
    let vuebtn = document.getElementById("vueBtn");
    openBtn.addEventListener("click", () => {
      // 获取节点
      let csdnBox = document.getElementsByClassName("cirle")[0];
      let openBox = document.getElementsByClassName("cirle")[1];
      let vueBox = document.getElementsByClassName("cirle")[2];
      let backFilter = document.getElementsByClassName("back-filter")[0];
      // 添加类属性
      backFilter.classList.add("back-after-filter");
      csdnBox.classList.add("csdn-location");
      csdnBox.style.opacity = "1";
      openBox.classList.add("close-status");
      vueBox.classList.add("vue-location");
      vueBox.style.opacity = "1";
    });
    csdnBtn.addEventListener("click", () => {
      csdnBtn.classList.add("click-after");
      setTimeout(() => {
        window.location.href = "https://blog.csdn.net/xiaohui33446";
      }, 100);
    });
    vueBtn.addEventListener("click", () => {
      vueBtn.classList.add("click-after");
      setTimeout(() => {
        window.location.href = "http://xiaohui-c.gitee.io/vue-checkbox";
      }, 100);
    });
  </script>
</html>
